import request from '@/config/axios'

// 店铺摄像头 VO
export interface CameraVO {
  id: number | string // 唯一编号
  shopId: number // 店铺编号
  status: number // 状态
}

// 店铺摄像头 API
export const CameraApi = {
  // 查询店铺摄像头分页
  getCameraPage: async (params: any) => {
    return await request.get({ url: `/shop/camera/page`, params })
  },

  // 查询店铺摄像头详情
  getCamera: async (id: number | string) => {
    return await request.get({ url: `/shop/camera/get?id=` + id })
  },

  // 新增店铺摄像头
  createCamera: async (data: CameraVO) => {
    return await request.post({ url: `/shop/camera/create`, data })
  },

  // 修改店铺摄像头
  updateCamera: async (data: CameraVO) => {
    return await request.put({ url: `/shop/camera/update`, data })
  },

  // 删除店铺摄像头
  deleteCamera: async (id: number | string) => {
    return await request.delete({ url: `/shop/camera/delete?id=` + id })
  }
}
